import { EntitySchema } from '@mikro-orm/core';

export class TypechoUserlog {
  id!: number;
  uid: number = -1;
  cid: number = 0;
  type?: string;
  num?: number = 0;
  created: number = 0;
  toid?: number = 0;
}

export const TypechoUserlogSchema = new EntitySchema({
  class: TypechoUserlog,
  properties: {
    id: { primary: true, type: 'number' },
    uid: { type: 'number', default: -1 },
    cid: { type: 'number', default: 0 },
    type: { type: 'string', length: 255, nullable: true },
    num: { type: 'number', nullable: true, default: 0 },
    created: { type: 'number', default: 0 },
    toid: { type: 'number', nullable: true, default: 0 },
  },
});
